package site.yunnong.atvris.portal.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import site.yunnong.atvris.common.api.ResultVO;
import site.yunnong.atvris.portal.util.FixDataUtil;

import javax.annotation.Resource;

/**
 * @author zjh
 * @date 2021/10/24 13:41
 */
@Api(tags = "修复数据接口")
@RestController
@RequestMapping("/fix")
public class FixDataController {
    
    @Resource
    private FixDataUtil fixDataUtil;
    
    @ApiOperation("修复视频时长")
    @RequestMapping("/fix-video-time")
    public ResultVO fixVideoTime() {
        fixDataUtil.fixVideoTime();
        return new ResultVO().success();
    }
    
    @ApiOperation("修复视频分区")
    @RequestMapping("/fix-video-partition")
    public ResultVO fixVideoPartition() {
        fixDataUtil.fixVideoPartition();
        return new ResultVO().success();
    }
    
    @ApiOperation("修复视频uvid")
    @RequestMapping("/fix-video-uvid")
    public ResultVO fixVideoUvid() {
        fixDataUtil.fixVideoUvid();
        return new ResultVO().success();
    }

    @ApiOperation("修复视频profile")
    @RequestMapping("/fix-video-profile")
    public ResultVO fixVideoProfile() {
        fixDataUtil.fixVideoProfile();
        return new ResultVO().success();
    }

    @ApiOperation("为视频打标签")
    @RequestMapping("/mark-video-tags")
    public ResultVO markVideoTags() {
        fixDataUtil.markVideoTags();
        return new ResultVO().success();
    }
}
